Various devices have been advised to dispense quantities of bulk items, such as candy in retail environments. Perhaps the simplest is a scoop of a predetermined size, with which a customer can scoop the bulk items out of a barrel.
However, modern considerations of sanitation and tamper-resistance dictate that such foods be secure from handling by the customer except as to the amounts being dispensed at the time.